package org.numanint.code;

import java.util.ArrayList;
import java.util.HashMap;


public class ValidatorXmlGenerator extends Generator {

	public ValidatorXmlGenerator(GeneratorProperties p){
		super(p);
	}
	
	public void generator(ReverseEngineer reveng) throws Exception{	
			HashMap<String,Object> data = new HashMap<String,Object>();
			ArrayList<TableClass> tableArray = new ArrayList<TableClass>();
			for(int i=0;i<reveng.getTableClasss().length;i++){	
				tableArray.add(reveng.getTableClasss()[i]);
			} 
			HashMap<String,Object> boMap=new HashMap<String,Object>();
			boMap.put("tableList",tableArray);
			boMap.put("properties", getProperties());
			data.put(ConventUtils.lowerFirstChar(getProperties().getProjectName())+"-validator.xml", boMap);
			super.setData(data);
			super.generator();
		
	}	
}
